import request from "../../utils/request";
/*data:->json形式传递数据*/
export default {
  addCourseInfo(courseInfo) {
    return request({
      url: '/eduservice/course/addCourseInfo',
      method: 'post',
      data: courseInfo
    });
  },
  getListTeacher() {
    return request({
      url: '/eduservice/edu-teacher/findAll',
      method: 'get'
    });
  },
  getCourseInfoId(id) {
    return request({
      url: '/eduservice/course/getCourseInfo/' + id,
      method: 'get'
    })
  },
  updateCourseInfo(courseInfo) {
    return request({
      url: '/eduservice/course/updateCourseInfo',
      method: 'post',
      data: coourseInfo
    })
  },
  //课程确认信息显示
  getPublihCourseInfo(id) {
    return request({
      url: '/eduservice/course/getPublishCourseInfo/'+id,
      method: 'get',
    })
  },
  //课程最终发布
  publihCourse(id) {
    return request({
      url: '/eduservice/course/publishCourse/'+id,
      method: 'post',
    })
  },
  //TODO 课程列表




  //课程最终发布
  getListCourse() {
    return request({
      url: '/eduservice/course',
      method: 'get'
    })
  },
  //TODO 根据课程id删除课程小节章节描述课程本身,没有引用
  deleteCourse(courseId){
    return request({
      url: '/eduservice/'+courseId,
      method: 'delete'
    })
  }
}
